package com.wyvoid.forum.dao.hibernate;

import com.wyvoid.core.persistent.hibernate.HibernateDAO;
import com.wyvoid.forum.domain.UserGroup;
import com.wyvoid.forum.dao.IUserGroupDAO;
import com.wyvoid.forum.Constant;

import java.util.List;

/**
 * User: cjp
 * Date: 2007-7-1
 * Time: 21:11:40
 */
public class UserGroupDAO extends HibernateDAO<UserGroup> implements IUserGroupDAO {
    public List<UserGroup> getUserGroups(int groupType) {
        String hql = "from UserGroup where type=?";
        return doQueryList(hql, true, groupType);
    }

    public List<UserGroup> getAdminGroups() {
        String hql = "from UserGroup where adminGroupId>0";
        return doQueryList(hql, true);
    }

}
